import request from '@/utils/request'
const api_name = '/admin/core/lend'
export default {
  //获取标的列表
  list(){
    return request({
      url: `${api_name}/list`,
      method: 'GET'
    })
  },
  //根据id获取标的详情
  detail(lendId){
    return request({
      url: `${api_name}/detail/${lendId}`,
      method: 'GET'
    })
  },
  //放款
  makeLoan(lendId){
    return request({
      url: `${api_name}/makeLoan/${lendId}`,
      method: 'GET'
    })
  },
  //投资记录的查询和展示
  getInvestRecords(lendId){
    return request({
      url: `/admin/core/lendItem/investRecord/${lendId}`,
      method: 'GET'
    })
  },
  //还款计划的查询和展示
  getReturnPlan(lendId){
    return request({
      url: `/admin/core/lendReturn/returnPlan/${lendId}`,
      method: 'GET'
    })
  }

}
